home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-04-15 | 7.8 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Sat Apr 15 00:18:55 1995, modified Sat Apr 15 00:18:55 1995, creator 'MMCC', type ASCII, 6987 bytes "GetScreenDevice.c" , at 0x1bcb 654 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 47 65 74 53 63 72 | 65 65 6e 44 65 76 69 63 |..GetScr|eenDevic|
|00000010| 65 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.c.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 1b 4b 00 | 00 02 8e ab b4 f9 af ab |......K.|........|
|00000060| b4 f9 af 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f3 31 00 00 |........|.....1..|
|00000080| 2f 2a 20 47 65 74 53 63 | 72 65 65 6e 44 65 76 69 |/* GetSc|reenDevi|
|00000090| 63 65 2e 63 0d 0d 09 64 | 65 76 69 63 65 3d 47 65 |ce.c...d|evice=Ge|
|000000a0| 74 53 63 72 65 65 6e 44 | 65 76 69 63 65 28 6e 29 |tScreenD|evice(n)|
|000000b0| 3b 0d 72 65 74 75 72 6e | 73 20 61 20 68 61 6e 64 |;.return|s a hand|
|000000c0| 6c 65 20 74 6f 20 74 68 | 65 20 6e 2d 74 68 20 73 |le to th|e n-th s|
|000000d0| 63 72 65 65 6e 2c 20 77 | 68 65 72 65 20 74 68 65 |creen, w|here the|
|000000e0| 20 4d 61 69 6e 44 65 76 | 69 63 65 20 69 73 20 74 | MainDev|ice is t|
|000000f0| 68 65 20 7a 65 72 6f 2d | 74 68 20 73 63 72 65 65 |he zero-|th scree|
|00000100| 6e 2e 20 0d 54 68 69 73 | 20 69 73 20 73 69 6d 69 |n. .This| is simi|
|00000110| 6c 61 72 2c 20 62 75 74 | 20 6e 6f 74 20 69 64 65 |lar, but| not ide|
|00000120| 6e 74 69 63 61 6c 2c 20 | 74 6f 20 74 68 65 20 73 |ntical, |to the s|
|00000130| 63 72 65 65 6e 20 6e 75 | 6d 62 65 72 20 69 6e 20 |creen nu|mber in |
|00000140| 74 68 65 20 4d 6f 6e 69 | 74 6f 72 73 0d 43 6f 6e |the Moni|tors.Con|
|00000150| 74 72 6f 6c 20 70 61 6e | 65 6c 2e 0d 0d 09 6e 3d |trol pan|el....n=|
|00000160| 47 65 74 53 63 72 65 65 | 6e 49 6e 64 65 78 28 64 |GetScree|nIndex(d|
|00000170| 65 76 69 63 65 29 3b 0d | 72 65 74 75 72 6e 73 20 |evice);.|returns |
|00000180| 74 68 65 20 69 6e 76 65 | 72 73 65 20 6f 66 20 47 |the inve|rse of G|
|00000190| 65 74 53 63 72 65 65 6e | 44 65 76 69 63 65 28 29 |etScreen|Device()|
|000001a0| 2e 20 0d 0d 09 73 6c 6f | 74 3d 47 65 74 44 65 76 |. ...slo|t=GetDev|
|000001b0| 69 63 65 53 6c 6f 74 28 | 64 65 76 69 63 65 29 3b |iceSlot(|device);|
|000001c0| 0d 67 65 74 73 20 74 68 | 65 20 22 73 6c 6f 74 22 |.gets th|e "slot"|
|000001d0| 20 66 6f 72 20 61 6e 79 | 20 73 63 72 65 65 6e 20 | for any| screen |
|000001e0| 64 65 76 69 63 65 2e 20 | 0d 0d 09 64 65 76 69 63 |device. |...devic|
|000001f0| 65 3d 53 6c 6f 74 54 6f | 53 63 72 65 65 6e 44 65 |e=SlotTo|ScreenDe|
|00000200| 76 69 63 65 28 6e 29 3b | 0d 72 65 74 75 72 6e 73 |vice(n);|.returns|
|00000210| 20 61 20 68 61 6e 64 6c | 65 20 74 6f 20 74 68 65 | a handl|e to the|
|00000220| 20 73 63 72 65 65 6e 20 | 64 65 76 69 63 65 20 69 | screen |device i|
|00000230| 6e 20 73 6c 6f 74 20 6e | 2e 20 0d 0d 09 64 65 76 |n slot n|. ...dev|
|00000240| 69 63 65 3d 47 65 74 57 | 69 6e 64 6f 77 44 65 76 |ice=GetW|indowDev|
|00000250| 69 63 65 28 77 69 6e 64 | 6f 77 29 3b 0d 72 65 74 |ice(wind|ow);.ret|
|00000260| 75 72 6e 73 20 47 44 48 | 61 6e 64 6c 65 20 6f 66 |urns GDH|andle of|
|00000270| 20 73 63 72 65 65 6e 20 | 77 69 74 68 20 6c 61 72 | screen |with lar|
|00000280| 67 65 73 74 20 69 6e 74 | 65 72 73 65 63 74 69 6f |gest int|ersectio|
|00000290| 6e 20 77 69 74 68 20 74 | 68 65 20 77 69 6e 64 6f |n with t|he windo|
|000002a0| 77 27 73 20 63 6f 6e 74 | 65 6e 74 2e 0d 0d 09 47 |w's cont|ent....G|
|000002b0| 44 48 61 6e 64 6c 65 09 | 47 65 74 44 65 76 69 63 |DHandle.|GetDevic|
|000002c0| 65 42 79 52 65 66 4e 75 | 6d 28 69 6e 74 20 6e 29 |eByRefNu|m(int n)|
|000002d0| 3b 0d 09 47 44 48 61 6e | 64 6c 65 09 47 65 74 52 |;..GDHan|dle.GetR|
|000002e0| 65 63 74 44 65 76 69 63 | 65 28 52 65 63 74 20 2a |ectDevic|e(Rect *|
|000002f0| 72 29 3b 0d 0d 09 76 6f | 69 64 09 09 4c 6f 63 61 |r);...vo|id..Loca|
|00000300| 6c 54 6f 47 6c 6f 62 61 | 6c 52 65 63 74 28 52 65 |lToGloba|lRect(Re|
|00000310| 63 74 20 2a 72 29 3b 0d | 09 76 6f 69 64 09 09 47 |ct *r);.|.void..G|
|00000320| 6c 6f 62 61 6c 54 6f 4c | 6f 63 61 6c 52 65 63 74 |lobalToL|ocalRect|
|00000330| 28 52 65 63 74 20 2a 72 | 29 3b 0d 0d 43 6f 70 79 |(Rect *r|);..Copy|
|00000340| 72 69 67 68 74 20 a9 20 | 31 39 38 39 2d 31 39 39 |right . |1989-199|
|00000350| 35 20 44 65 6e 69 73 20 | 47 2e 20 50 65 6c 6c 69 |5 Denis |G. Pelli|
|00000360| 0d 48 49 53 54 4f 52 59 | 3a 0d 33 2f 32 30 2f 39 |.HISTORY|:.3/20/9|
|00000370| 30 09 09 64 67 70 09 6d | 61 6b 65 20 63 6f 6d 70 |0..dgp.m|ake comp|
|00000380| 61 74 69 62 6c 65 20 77 | 69 74 68 20 4d 50 57 20 |atible w|ith MPW |
|00000390| 43 2e 0d 33 2f 32 32 2f | 39 30 09 64 67 70 09 63 |C..3/22/|90.dgp.c|
|000003a0| 68 61 6e 67 65 64 20 47 | 65 74 44 65 76 69 63 65 |hanged G|etDevice|
|000003b0| 53 6c 6f 74 20 74 6f 20 | 75 73 65 20 74 68 65 20 |Slot to |use the |
|000003c0| 41 75 78 44 43 45 48 61 | 6e 64 6c 65 20 69 6e 73 |AuxDCEHa|ndle ins|
|000003d0| 74 65 61 64 20 6f 66 20 | 64 65 64 75 63 69 6e 67 |tead of |deducing|
|000003e0| 20 69 74 0d 09 09 09 66 | 72 6f 6d 20 74 68 65 20 | it....f|rom the |
|000003f0| 62 61 73 65 41 64 64 72 | 20 6f 66 20 74 68 65 20 |baseAddr| of the |
|00000400| 50 69 78 4d 61 70 2e 20 | 54 68 69 73 20 69 73 20 |PixMap. |This is |
|00000410| 61 20 63 6c 65 61 6e 65 | 72 20 77 61 79 20 74 6f |a cleane|r way to|
|00000420| 20 64 6f 20 69 74 2e 0d | 34 2f 39 2f 39 30 09 64 | do it..|4/9/90.d|
|00000430| 67 70 09 65 6c 69 6d 69 | 6e 61 74 65 64 20 23 64 |gp.elimi|nated #d|
|00000440| 65 66 69 6e 65 20 66 6f | 72 20 4d 61 69 6e 73 63 |efine fo|r Mainsc|
|00000450| 72 6e 20 6d 69 73 70 65 | 6c 6c 69 6e 67 20 69 6e |rn mispe|lling in|
|00000460| 20 43 6f 6c 6f 72 2e 68 | 0d 31 30 2f 31 37 2f 39 | Color.h|.10/17/9|
|00000470| 30 20 64 67 70 20 41 64 | 64 65 64 20 41 64 64 72 |0 dgp Ad|ded Addr|
|00000480| 65 73 73 54 6f 53 63 72 | 65 65 6e 44 65 76 69 63 |essToScr|eenDevic|
|00000490| 65 28 29 20 66 6f 72 20 | 63 6f 6d 70 61 74 69 62 |e() for |compatib|
|000004a0| 69 6c 69 74 79 20 77 69 | 74 68 20 62 75 69 6c 74 |ility wi|th built|
|000004b0| 2d 69 6e 20 76 69 64 65 | 6f 20 6f 6e 0d 09 09 09 |-in vide|o on....|
|000004c0| 74 68 65 20 4d 61 63 20 | 49 49 63 69 2c 20 49 49 |the Mac |IIci, II|
|000004d0| 73 69 2c 20 61 6e 64 20 | 4c 43 2e 0d 31 30 2f 31 |si, and |LC..10/1|
|000004e0| 38 2f 39 30 20 64 67 70 | 20 41 64 64 65 64 20 4c |8/90 dgp| Added L|
|000004f0| 6f 63 61 6c 54 6f 47 6c | 6f 62 61 6c 52 65 63 74 |ocalToGl|obalRect|
|00000500| 28 29 20 61 6e 64 20 47 | 65 74 57 69 6e 64 6f 77 |() and G|etWindow|
|00000510| 44 65 76 69 63 65 28 29 | 2e 0d 38 2f 32 34 2f 39 |Device()|..8/24/9|
|00000520| 31 09 09 64 67 70 09 4d | 61 64 65 20 63 6f 6d 70 |1..dgp.M|ade comp|
|00000530| 61 74 69 62 6c 65 20 77 | 69 74 68 20 54 48 49 4e |atible w|ith THIN|
|00000540| 4b 20 43 20 35 2e 30 2e | 0d 32 2f 31 2f 39 32 09 |K C 5.0.|.2/1/92.|
|00000550| 64 67 70 09 46 69 78 65 | 64 20 62 75 67 73 20 69 |dgp.Fixe|d bugs i|
|00000560| 6e 20 47 65 74 57 69 6e | 64 6f 77 44 65 76 69 63 |n GetWin|dowDevic|
|00000570| 65 28 29 20 77 68 69 63 | 68 20 72 65 73 75 6c 74 |e() whic|h result|
|00000580| 65 64 20 69 6e 20 72 65 | 74 75 72 6e 69 6e 67 20 |ed in re|turning |
|00000590| 67 61 72 62 61 67 65 20 | 47 44 48 61 6e 64 6c 65 |garbage |GDHandle|
|000005a0| 2e 0d 33 2f 33 2f 39 32 | 09 64 67 70 09 49 6e 20 |..3/3/92|.dgp.In |
|000005b0| 47 65 74 53 63 72 65 65 | 6e 44 65 76 69 63 65 28 |GetScree|nDevice(|
|000005c0| 29 2c 20 73 6b 69 70 20 | 69 6e 61 63 74 69 76 65 |), skip |inactive|
|000005d0| 20 73 63 72 65 65 6e 73 | 2e 0d 38 2f 32 30 2f 39 | screens|..8/20/9|
|000005e0| 32 09 64 67 70 09 65 78 | 70 61 6e 64 65 64 20 63 |2.dgp.ex|panded c|
|000005f0| 6f 6d 6d 65 6e 74 73 20 | 6f 66 20 47 65 74 44 65 |omments |of GetDe|
|00000600| 76 69 63 65 53 6c 6f 74 | 28 29 2c 20 6e 6f 74 69 |viceSlot|(), noti|
|00000610| 6e 67 20 74 68 61 74 20 | 69 74 20 77 6f 72 6b 73 |ng that |it works|
|00000620| 20 65 76 65 6e 20 77 69 | 74 68 0d 09 09 09 62 75 | even wi|th....bu|
|00000630| 69 6c 74 2d 69 6e 20 76 | 69 64 65 6f 2c 20 65 2e |ilt-in v|ideo, e.|
|00000640| 67 2e 20 6f 6e 20 4d 61 | 63 20 49 49 63 69 2e 0d |g. on Ma|c IIci..|
|00000650| 38 2f 32 36 2f 39 32 09 | 64 67 70 09 47 65 74 44 |8/26/92.|dgp.GetD|
|00000660| 65 76 69 63 65 53 6c 6f | 74 28 29 20 6e 6f 77 20 |eviceSlo|t() now |
|00000670| 72 65 74 75 72 6e 73 20 | 2d 31 20 69 66 20 6e 6f |returns |-1 if no|
|00000680| 6e 65 2c 20 73 69 6e 63 | 65 20 7a 65 72 6f 20 69 |ne, sinc|e zero i|
|00000690| 73 20 61 20 6c 65 67 61 | 6c 20 73 6c 6f 74 2e 0d |s a lega|l slot..|
|000006a0| 09 09 09 47 65 74 53 63 | 72 65 65 6e 44 65 76 69 |...GetSc|reenDevi|
|000006b0| 63 65 28 29 20 66 69 72 | 73 74 20 63 68 65 63 6b |ce() fir|st check|
|000006c0| 73 20 66 6f 72 20 38 2d | 62 69 74 20 51 75 69 63 |s for 8-|bit Quic|
|000006d0| 6b 44 72 61 77 28 29 2e | 0d 39 2f 31 30 2f 39 32 |kDraw().|.9/10/92|
|000006e0| 09 64 67 70 09 41 63 74 | 75 61 6c 6c 79 20 69 6d |.dgp.Act|ually im|
|000006f0| 70 6c 65 6d 65 6e 74 65 | 64 20 74 68 65 20 38 2f |plemente|d the 8/|
|00000700| 32 36 20 63 68 61 6e 67 | 65 20 69 6e 73 74 65 61 |26 chang|e instea|
|00000710| 64 20 6f 66 20 6a 75 73 | 74 20 63 68 61 6e 67 69 |d of jus|t changi|
|00000720| 6e 67 20 74 68 65 20 0d | 09 09 09 64 6f 63 75 6d |ng the .|...docum|
|00000730| 65 6e 74 61 74 69 6f 6e | 2e 20 4f 6f 70 73 2e 0d |entation|. Oops..|
|00000740| 34 2f 31 37 2f 39 33 09 | 64 67 70 20 44 65 6c 65 |4/17/93.|dgp Dele|
|00000750| 74 65 64 20 6f 62 73 6f | 6c 65 74 65 20 41 64 64 |ted obso|lete Add|
|00000760| 72 65 73 73 54 6f 53 6c | 6f 74 20 61 6e 64 20 41 |ressToSl|ot and A|
|00000770| 64 64 72 65 73 73 54 6f | 53 63 72 65 65 6e 44 65 |ddressTo|ScreenDe|
|00000780| 76 69 63 65 2e 0d 35 2f | 32 31 2f 39 33 09 64 67 |vice..5/|21/93.dg|
|00000790| 70 09 46 69 78 65 64 20 | 47 65 74 57 69 6e 64 6f |p.Fixed |GetWindo|
|000007a0| 77 44 65 76 69 63 65 28 | 29 20 74 6f 20 73 75 70 |wDevice(|) to sup|
|000007b0| 70 6f 72 74 20 47 57 6f | 72 6c 64 27 73 2e 0d 38 |port GWo|rld's..8|
|000007c0| 2f 31 34 2f 39 33 09 64 | 67 70 09 42 61 73 65 64 |/14/93.d|gp.Based|
|000007d0| 20 6f 6e 20 61 6e 73 77 | 65 72 20 66 72 6f 6d 20 | on answ|er from |
|000007e0| 44 45 56 53 55 50 50 4f | 52 54 2c 20 49 20 63 6c |DEVSUPPO|RT, I cl|
|000007f0| 65 61 6e 65 64 20 75 70 | 20 47 65 74 57 69 6e 64 |eaned up| GetWind|
|00000800| 6f 77 44 65 76 69 63 65 | 28 29 2e 0d 34 2f 31 31 |owDevice|()..4/11|
|00000810| 2f 39 34 09 64 67 70 09 | 41 64 64 65 64 20 47 65 |/94.dgp.|Added Ge|
|00000820| 74 52 65 63 74 44 65 76 | 69 63 65 28 29 20 62 61 |tRectDev|ice() ba|
|00000830| 73 65 64 20 6f 6e 20 63 | 6f 64 65 20 65 78 74 72 |sed on c|ode extr|
|00000840| 61 63 74 65 64 20 66 72 | 6f 6d 20 47 65 74 57 69 |acted fr|om GetWi|
|00000850| 6e 64 6f 77 44 65 76 69 | 63 65 28 29 2e 0d 31 31 |ndowDevi|ce()..11|
|00000860| 2f 33 30 2f 39 34 20 64 | 67 70 20 61 64 64 65 64 |/30/94 d|gp added|
|00000870| 20 47 65 74 44 65 76 69 | 63 65 42 79 52 65 66 4e | GetDevi|ceByRefN|
|00000880| 75 6d 28 29 2e 0d 2a 2f | 0d 23 69 6e 63 6c 75 64 |um()..*/|.#includ|
|00000890| 65 20 22 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |e "Video|Toolbox.|
|000008a0| 68 22 0d 47 44 48 61 6e | 64 6c 65 20 47 65 74 52 |h".GDHan|dle GetR|
|000008b0| 65 63 74 44 65 76 69 63 | 65 28 52 65 63 74 20 2a |ectDevic|e(Rect *|
|000008c0| 72 29 3b 0d 47 44 48 61 | 6e 64 6c 65 20 47 65 74 |r);.GDHa|ndle Get|
|000008d0| 44 65 76 69 63 65 42 79 | 52 65 66 4e 75 6d 28 69 |DeviceBy|RefNum(i|
|000008e0| 6e 74 20 6e 29 3b 0d 0d | 47 44 48 61 6e 64 6c 65 |nt n);..|GDHandle|
|000008f0| 20 47 65 74 53 63 72 65 | 65 6e 44 65 76 69 63 65 | GetScre|enDevice|
|00000900| 28 69 6e 74 20 6e 29 0d | 2f 2f 20 52 65 74 75 72 |(int n).|// Retur|
|00000910| 6e 73 20 61 20 68 61 6e | 64 6c 65 20 74 6f 20 74 |ns a han|dle to t|
|00000920| 68 65 20 6e 2d 74 68 20 | 73 63 72 65 65 6e 2c 20 |he n-th |screen, |
|00000930| 77 68 65 72 65 20 74 68 | 65 20 4d 61 69 6e 44 65 |where th|e MainDe|
|00000940| 76 69 63 65 20 69 73 20 | 74 68 65 20 7a 65 72 6f |vice is |the zero|
|00000950| 2d 74 68 20 73 63 72 65 | 65 6e 2e 0d 2f 2f 20 52 |-th scre|en..// R|
|00000960| 65 74 75 72 6e 73 20 4e | 55 4c 4c 20 69 66 20 72 |eturns N|ULL if r|
|00000970| 65 71 75 65 73 74 20 63 | 61 6e 27 74 20 62 65 20 |equest c|an't be |
|00000980| 73 61 74 69 73 66 69 65 | 64 2e 0d 7b 0d 09 47 44 |satisfie|d..{..GD|
|00000990| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 3b 0d 09 |Handle d|evice;..|
|000009a0| 69 6e 74 20 69 2c 65 72 | 72 6f 72 3b 0d 09 6c 6f |int i,er|ror;..lo|
|000009b0| 6e 67 20 76 61 6c 75 65 | 3b 0d 0d 09 69 66 28 6e |ng value|;...if(n|
|000009c0| 3c 30 29 72 65 74 75 72 | 6e 20 4e 55 4c 4c 3b 0d |<0)retur|n NULL;.|
|000009d0| 09 65 72 72 6f 72 3d 47 | 65 73 74 61 6c 74 28 67 |.error=G|estalt(g|
|000009e0| 65 73 74 61 6c 74 51 75 | 69 63 6b 64 72 61 77 56 |estaltQu|ickdrawV|
|000009f0| 65 72 73 69 6f 6e 2c 26 | 76 61 6c 75 65 29 3b 0d |ersion,&|value);.|
|00000a00| 09 69 66 28 65 72 72 6f | 72 20 7c 7c 20 76 61 6c |.if(erro|r || val|
|00000a10| 75 65 3c 67 65 73 74 61 | 6c 74 38 42 69 74 51 44 |ue<gesta|lt8BitQD|
|00000a20| 29 72 65 74 75 72 6e 20 | 4e 55 4c 4c 3b 09 2f 2f |)return |NULL;.//|
|00000a30| 20 6e 65 65 64 20 38 2d | 62 69 74 20 71 75 69 63 | need 8-|bit quic|
|00000a40| 6b 64 72 61 77 0d 09 69 | 66 28 6e 3d 3d 30 29 20 |kdraw..i|f(n==0) |
|00000a50| 72 65 74 75 72 6e 20 47 | 65 74 4d 61 69 6e 44 65 |return G|etMainDe|
|00000a60| 76 69 63 65 28 29 3b 0d | 09 64 65 76 69 63 65 3d |vice();.|.device=|
|00000a70| 47 65 74 44 65 76 69 63 | 65 4c 69 73 74 28 29 3b |GetDevic|eList();|
|00000a80| 0d 09 69 3d 30 3b 0d 09 | 77 68 69 6c 65 28 64 65 |..i=0;..|while(de|
|00000a90| 76 69 63 65 21 3d 4e 55 | 4c 4c 29 7b 0d 09 09 69 |vice!=NU|LL){...i|
|00000aa0| 66 20 28 54 65 73 74 44 | 65 76 69 63 65 41 74 74 |f (TestD|eviceAtt|
|00000ab0| 72 69 62 75 74 65 28 64 | 65 76 69 63 65 2c 73 63 |ribute(d|evice,sc|
|00000ac0| 72 65 65 6e 44 65 76 69 | 63 65 29 0d 09 09 09 26 |reenDevi|ce)....&|
|00000ad0| 26 20 21 54 65 73 74 44 | 65 76 69 63 65 41 74 74 |& !TestD|eviceAtt|
|00000ae0| 72 69 62 75 74 65 28 64 | 65 76 69 63 65 2c 6d 61 |ribute(d|evice,ma|
|00000af0| 69 6e 53 63 72 65 65 6e | 29 0d 09 09 09 26 26 20 |inScreen|)....&& |
|00000b00| 54 65 73 74 44 65 76 69 | 63 65 41 74 74 72 69 62 |TestDevi|ceAttrib|
|00000b10| 75 74 65 28 64 65 76 69 | 63 65 2c 73 63 72 65 65 |ute(devi|ce,scree|
|00000b20| 6e 41 63 74 69 76 65 29 | 29 7b 0d 09 09 09 09 69 |nActive)|){.....i|
|00000b30| 2b 2b 3b 0d 09 09 09 09 | 69 66 28 69 3d 3d 6e 29 |++;.....|if(i==n)|
|00000b40| 62 72 65 61 6b 3b 0d 09 | 09 09 7d 0d 09 09 64 65 |break;..|..}...de|
|00000b50| 76 69 63 65 20 3d 20 47 | 65 74 4e 65 78 74 44 65 |vice = G|etNextDe|
|00000b60| 76 69 63 65 28 64 65 76 | 69 63 65 29 3b 0d 09 7d |vice(dev|ice);..}|
|00000b70| 0d 09 72 65 74 75 72 6e | 20 64 65 76 69 63 65 3b |..return| device;|
|00000b80| 0d 7d 0d 0d 47 44 48 61 | 6e 64 6c 65 20 47 65 74 |.}..GDHa|ndle Get|
|00000b90| 44 65 76 69 63 65 42 79 | 52 65 66 4e 75 6d 28 69 |DeviceBy|RefNum(i|
|00000ba0| 6e 74 20 6e 29 0d 7b 0d | 09 69 6e 74 20 6a 3b 0d |nt n).{.|.int j;.|
|00000bb0| 09 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |.GDHandl|e device|
|00000bc0| 3b 0d 0d 09 66 6f 72 28 | 6a 3d 30 3b 3b 6a 2b 2b |;...for(|j=0;;j++|
|00000bd0| 29 7b 0d 09 09 64 65 76 | 69 63 65 3d 47 65 74 53 |){...dev|ice=GetS|
|00000be0| 63 72 65 65 6e 44 65 76 | 69 63 65 28 6a 29 3b 0d |creenDev|ice(j);.|
|00000bf0| 09 09 69 66 28 64 65 76 | 69 63 65 3d 3d 4e 55 4c |..if(dev|ice==NUL|
|00000c00| 4c 20 7c 7c 20 6e 3d 3d | 28 2a 2a 64 65 76 69 63 |L || n==|(**devic|
|00000c10| 65 29 2e 67 64 52 65 66 | 4e 75 6d 29 62 72 65 61 |e).gdRef|Num)brea|
|00000c20| 6b 3b 0d 09 7d 0d 09 72 | 65 74 75 72 6e 20 64 65 |k;..}..r|eturn de|
|00000c30| 76 69 63 65 3b 0d 7d 0d | 0d 69 6e 74 20 47 65 74 |vice;.}.|.int Get|
|00000c40| 53 63 72 65 65 6e 49 6e | 64 65 78 28 47 44 48 61 |ScreenIn|dex(GDHa|
|00000c50| 6e 64 6c 65 20 64 65 76 | 69 63 65 29 0d 2f 2f 20 |ndle dev|ice).// |
|00000c60| 49 6e 76 65 72 73 65 20 | 6f 66 20 47 65 74 53 63 |Inverse |of GetSc|
|00000c70| 72 65 65 6e 44 65 76 69 | 63 65 28 29 2e 20 52 65 |reenDevi|ce(). Re|
|00000c80| 74 75 72 6e 73 20 2d 31 | 20 69 66 20 72 65 71 75 |turns -1| if requ|
|00000c90| 65 73 74 20 63 61 6e 27 | 74 20 62 65 20 73 61 74 |est can'|t be sat|
|00000ca0| 69 73 66 69 65 64 2e 0d | 7b 0d 09 69 6e 74 20 69 |isfied..|{..int i|
|00000cb0| 2c 65 72 72 6f 72 3b 0d | 09 6c 6f 6e 67 20 76 61 |,error;.|.long va|
|00000cc0| 6c 75 65 3b 0d 0d 09 65 | 72 72 6f 72 3d 47 65 73 |lue;...e|rror=Ges|
|00000cd0| 74 61 6c 74 28 67 65 73 | 74 61 6c 74 51 75 69 63 |talt(ges|taltQuic|
|00000ce0| 6b 64 72 61 77 56 65 72 | 73 69 6f 6e 2c 26 76 61 |kdrawVer|sion,&va|
|00000cf0| 6c 75 65 29 3b 0d 09 69 | 66 28 65 72 72 6f 72 20 |lue);..i|f(error |
|00000d00| 7c 7c 20 76 61 6c 75 65 | 3c 67 65 73 74 61 6c 74 ||| value|<gestalt|
|00000d10| 38 42 69 74 51 44 29 72 | 65 74 75 72 6e 20 30 3b |8BitQD)r|eturn 0;|
|00000d20| 0d 09 69 66 28 64 65 76 | 69 63 65 3d 3d 4e 55 4c |..if(dev|ice==NUL|
|00000d30| 4c 29 72 65 74 75 72 6e | 20 2d 31 3b 0d 09 66 6f |L)return| -1;..fo|
|00000d40| 72 28 69 3d 30 3b 69 3c | 31 36 3b 69 2b 2b 29 69 |r(i=0;i<|16;i++)i|
|00000d50| 66 28 64 65 76 69 63 65 | 3d 3d 47 65 74 53 63 72 |f(device|==GetScr|
|00000d60| 65 65 6e 44 65 76 69 63 | 65 28 69 29 29 72 65 74 |eenDevic|e(i))ret|
|00000d70| 75 72 6e 20 69 3b 0d 09 | 72 65 74 75 72 6e 20 2d |urn i;..|return -|
|00000d80| 31 3b 0d 7d 0d 0d 73 68 | 6f 72 74 20 69 6e 74 20 |1;.}..sh|ort int |
|00000d90| 47 65 74 44 65 76 69 63 | 65 53 6c 6f 74 28 47 44 |GetDevic|eSlot(GD|
|00000da0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 29 0d 2f |Handle d|evice)./|
|00000db0| 2f 20 47 65 74 73 20 74 | 68 65 20 22 73 6c 6f 74 |/ Gets t|he "slot|
|00000dc0| 22 20 66 6f 72 20 61 6e | 79 20 73 63 72 65 65 6e |" for an|y screen|
|00000dd0| 20 64 65 76 69 63 65 2c | 20 65 76 65 6e 20 69 66 | device,| even if|
|00000de0| 20 69 74 27 73 20 62 75 | 69 6c 74 2d 69 6e 20 76 | it's bu|ilt-in v|
|00000df0| 69 64 65 6f 2c 20 65 2e | 67 2e 20 6f 6e 20 4d 61 |ideo, e.|g. on Ma|
|00000e00| 63 0d 2f 2f 20 49 49 63 | 69 20 6f 72 20 51 75 61 |c.// IIc|i or Qua|
|00000e10| 64 72 61 2e 20 53 65 65 | 20 31 39 39 32 20 49 6e |dra. See| 1992 In|
|00000e20| 73 69 64 65 20 4d 61 63 | 20 22 50 72 6f 63 65 73 |side Mac| "Proces|
|00000e30| 73 65 73 22 20 70 61 67 | 65 20 34 2d 31 31 2e 20 |ses" pag|e 4-11. |
|00000e40| 52 65 74 75 72 6e 73 20 | 2d 31 20 69 66 20 6e 6f |Returns |-1 if no|
|00000e50| 6e 65 2e 0d 2f 2f 20 5a | 65 72 6f 20 69 73 20 61 |ne..// Z|ero is a|
|00000e60| 20 6c 65 67 61 6c 20 73 | 6c 6f 74 20 66 6f 72 20 | legal s|lot for |
|00000e70| 62 75 69 6c 74 2d 69 6e | 20 76 69 64 65 6f 20 64 |built-in| video d|
|00000e80| 65 76 69 63 65 73 2e 0d | 7b 0d 09 41 75 78 44 43 |evices..|{..AuxDC|
|00000e90| 45 48 61 6e 64 6c 65 20 | 6d 79 41 75 78 44 43 45 |EHandle |myAuxDCE|
|00000ea0| 48 61 6e 64 6c 65 3b 0d | 20 0d 09 69 66 28 64 65 |Handle;.| ..if(de|
|00000eb0| 76 69 63 65 20 3d 3d 20 | 4e 55 4c 4c 29 20 72 65 |vice == |NULL) re|
|00000ec0| 74 75 72 6e 20 2d 31 3b | 0d 09 6d 79 41 75 78 44 |turn -1;|..myAuxD|
|00000ed0| 43 45 48 61 6e 64 6c 65 | 3d 28 41 75 78 44 43 45 |CEHandle|=(AuxDCE|
|00000ee0| 48 61 6e 64 6c 65 29 20 | 47 65 74 44 43 74 6c 45 |Handle) |GetDCtlE|
|00000ef0| 6e 74 72 79 28 28 2a 2a | 64 65 76 69 63 65 29 2e |ntry((**|device).|
|00000f00| 67 64 52 65 66 4e 75 6d | 29 3b 0d 09 72 65 74 75 |gdRefNum|);..retu|
|00000f10| 72 6e 20 28 28 2a 2a 6d | 79 41 75 78 44 43 45 48 |rn ((**m|yAuxDCEH|
|00000f20| 61 6e 64 6c 65 29 2e 64 | 43 74 6c 53 6c 6f 74 29 |andle).d|CtlSlot)|
|00000f30| 3b 0d 7d 0d 0d 47 44 48 | 61 6e 64 6c 65 20 53 6c |;.}..GDH|andle Sl|
|00000f40| 6f 74 54 6f 53 63 72 65 | 65 6e 44 65 76 69 63 65 |otToScre|enDevice|
|00000f50| 28 69 6e 74 20 6e 29 0d | 2f 2f 20 52 65 74 75 72 |(int n).|// Retur|
|00000f60| 6e 73 20 61 20 68 61 6e | 64 6c 65 20 74 6f 20 74 |ns a han|dle to t|
|00000f70| 68 65 20 73 63 72 65 65 | 6e 20 64 65 76 69 63 65 |he scree|n device|
|00000f80| 20 69 6e 20 73 6c 6f 74 | 20 6e 2e 0d 2f 2f 20 52 | in slot| n..// R|
|00000f90| 65 74 75 72 6e 73 20 4e | 55 4c 4c 20 69 66 20 72 |eturns N|ULL if r|
|00000fa0| 65 71 75 65 73 74 20 63 | 61 6e 27 74 20 62 65 20 |equest c|an't be |
|00000fb0| 73 61 74 69 73 66 69 65 | 64 2e 0d 7b 0d 09 47 44 |satisfie|d..{..GD|
|00000fc0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 3b 0d 0d |Handle d|evice;..|
|00000fd0| 09 64 65 76 69 63 65 3d | 47 65 74 44 65 76 69 63 |.device=|GetDevic|
|00000fe0| 65 4c 69 73 74 28 29 3b | 0d 09 77 68 69 6c 65 28 |eList();|..while(|
|00000ff0| 64 65 76 69 63 65 21 3d | 4e 55 4c 4c 29 20 7b 0d |device!=|NULL) {.|
|00001000| 09 09 69 66 20 28 54 65 | 73 74 44 65 76 69 63 65 |..if (Te|stDevice|
|00001010| 41 74 74 72 69 62 75 74 | 65 28 64 65 76 69 63 65 |Attribut|e(device|
|00001020| 2c 73 63 72 65 65 6e 44 | 65 76 69 63 65 29 20 26 |,screenD|evice) &|
|00001030| 26 0d 09 09 09 47 65 74 | 44 65 76 69 63 65 53 6c |&....Get|DeviceSl|
|00001040| 6f 74 28 64 65 76 69 63 | 65 29 3d 3d 6e 29 0d 09 |ot(devic|e)==n)..|
|00001050| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 64 65 76 69 |...break|;...devi|
|00001060| 63 65 3d 47 65 74 4e 65 | 78 74 44 65 76 69 63 65 |ce=GetNe|xtDevice|
|00001070| 28 64 65 76 69 63 65 29 | 3b 0d 09 7d 0d 09 72 65 |(device)|;..}..re|
|00001080| 74 75 72 6e 20 64 65 76 | 69 63 65 3b 0d 7d 0d 0d |turn dev|ice;.}..|
|00001090| 47 44 48 61 6e 64 6c 65 | 20 47 65 74 57 69 6e 64 |GDHandle| GetWind|
|000010a0| 6f 77 44 65 76 69 63 65 | 28 57 69 6e 64 6f 77 50 |owDevice|(WindowP|
|000010b0| 74 72 20 77 69 6e 64 6f | 77 29 0d 2f 2f 20 46 6f |tr windo|w).// Fo|
|000010c0| 72 20 6f 6e 2d 73 63 72 | 65 65 6e 20 77 69 6e 64 |r on-scr|een wind|
|000010d0| 6f 77 2c 20 72 65 74 75 | 72 6e 73 20 47 44 48 61 |ow, retu|rns GDHa|
|000010e0| 6e 64 6c 65 20 6f 66 20 | 73 63 72 65 65 6e 20 77 |ndle of |screen w|
|000010f0| 69 74 68 20 6c 61 72 67 | 65 73 74 20 69 6e 74 65 |ith larg|est inte|
|00001100| 72 73 65 63 74 69 6f 6e | 20 77 69 74 68 20 74 68 |rsection| with th|
|00001110| 65 20 0d 2f 2f 20 77 69 | 6e 64 6f 77 27 73 20 63 |e .// wi|ndow's c|
|00001120| 6f 6e 74 65 6e 74 2e 0d | 2f 2f 20 46 6f 72 20 6f |ontent..|// For o|
|00001130| 66 66 2d 73 63 72 65 65 | 6e 20 77 69 6e 64 6f 77 |ff-scree|n window|
|00001140| 20 28 69 2e 65 2e 20 47 | 57 6f 72 6c 64 29 2c 20 | (i.e. G|World), |
|00001150| 69 74 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 47 |it retur|ns the G|
|00001160| 44 48 61 6e 64 6c 65 20 | 6f 66 20 74 68 65 20 61 |DHandle |of the a|
|00001170| 73 73 6f 63 69 61 74 65 | 64 20 64 65 76 69 63 65 |ssociate|d device|
|00001180| 2e 0d 7b 0d 09 52 65 63 | 74 20 72 3b 0d 09 57 69 |..{..Rec|t r;..Wi|
|00001190| 6e 64 6f 77 50 74 72 20 | 6f 6c 64 57 69 6e 64 6f |ndowPtr |oldWindo|
|000011a0| 77 3b 0d 09 6c 6f 6e 67 | 20 71 44 3b 0d 0d 09 69 |w;..long| qD;...i|
|000011b0| 66 28 77 69 6e 64 6f 77 | 3d 3d 4e 55 4c 4c 29 72 |f(window|==NULL)r|
|000011c0| 65 74 75 72 6e 20 4e 55 | 4c 4c 3b 0d 09 47 65 73 |eturn NU|LL;..Ges|
|000011d0| 74 61 6c 74 28 67 65 73 | 74 61 6c 74 51 75 69 63 |talt(ges|taltQuic|
|000011e0| 6b 64 72 61 77 56 65 72 | 73 69 6f 6e 2c 26 71 44 |kdrawVer|sion,&qD|
|000011f0| 29 3b 0d 09 69 66 28 71 | 44 3e 3d 67 65 73 74 61 |);..if(q|D>=gesta|
|00001200| 6c 74 33 32 42 69 74 51 | 44 20 26 26 20 28 28 28 |lt32BitQ|D && (((|
|00001210| 43 57 69 6e 64 6f 77 50 | 74 72 29 77 69 6e 64 6f |CWindowP|tr)windo|
|00001220| 77 29 2d 3e 70 6f 72 74 | 56 65 72 73 69 6f 6e 26 |w)->port|Version&|
|00001230| 30 78 63 30 30 31 29 3d | 3d 30 78 63 30 30 31 29 |0xc001)=|=0xc001)|
|00001240| 7b 0d 09 09 2f 2f 20 49 | 74 27 73 20 61 20 47 57 |{...// I|t's a GW|
|00001250| 6f 72 6c 64 20 69 66 66 | 20 74 68 65 20 70 6f 72 |orld iff| the por|
|00001260| 74 56 65 72 73 69 6f 6e | 20 68 61 73 20 62 6f 74 |tVersion| has bot|
|00001270| 68 20 68 69 67 68 20 62 | 69 74 73 20 73 65 74 20 |h high b|its set |
|00001280| 28 63 47 72 61 66 50 6f | 72 74 29 20 61 6e 64 0d |(cGrafPo|rt) and.|
|00001290| 09 09 2f 2f 20 74 68 65 | 20 6c 6f 77 20 62 69 74 |..// the| low bit|
|000012a0| 20 73 65 74 20 28 47 57 | 6f 72 6c 64 29 2e 20 53 | set (GW|orld). S|
|000012b0| 65 65 20 41 70 70 6c 65 | 20 54 65 63 68 20 4e 6f |ee Apple| Tech No|
|000012c0| 74 65 20 d2 52 6f 77 42 | 79 74 65 73 20 52 65 76 |te .RowB|ytes Rev|
|000012d0| 65 61 6c 65 64 20 49 49 | d3 2e 0d 09 09 72 65 74 |ealed II|.....ret|
|000012e0| 75 72 6e 20 47 65 74 47 | 57 6f 72 6c 64 44 65 76 |urn GetG|WorldDev|
|000012f0| 69 63 65 28 28 47 57 6f | 72 6c 64 50 74 72 29 77 |ice((GWo|rldPtr)w|
|00001300| 69 6e 64 6f 77 29 3b 0d | 09 7d 0d 09 72 3d 77 69 |indow);.|.}..r=wi|
|00001310| 6e 64 6f 77 2d 3e 70 6f | 72 74 52 65 63 74 3b 0d |ndow->po|rtRect;.|
|00001320| 09 47 65 74 50 6f 72 74 | 28 26 6f 6c 64 57 69 6e |.GetPort|(&oldWin|
|00001330| 64 6f 77 29 3b 0d 09 53 | 65 74 50 6f 72 74 28 77 |dow);..S|etPort(w|
|00001340| 69 6e 64 6f 77 29 3b 0d | 09 4c 6f 63 61 6c 54 6f |indow);.|.LocalTo|
|00001350| 47 6c 6f 62 61 6c 52 65 | 63 74 28 26 72 29 3b 0d |GlobalRe|ct(&r);.|
|00001360| 09 53 65 74 50 6f 72 74 | 28 6f 6c 64 57 69 6e 64 |.SetPort|(oldWind|
|00001370| 6f 77 29 3b 0d 09 72 65 | 74 75 72 6e 20 47 65 74 |ow);..re|turn Get|
|00001380| 52 65 63 74 44 65 76 69 | 63 65 28 26 72 29 3b 0d |RectDevi|ce(&r);.|
|00001390| 7d 0d 0d 47 44 48 61 6e | 64 6c 65 20 47 65 74 52 |}..GDHan|dle GetR|
|000013a0| 65 63 74 44 65 76 69 63 | 65 28 52 65 63 74 20 2a |ectDevic|e(Rect *|
|000013b0| 72 29 0d 2f 2f 20 52 65 | 74 75 72 6e 73 20 47 44 |r).// Re|turns GD|
|000013c0| 48 61 6e 64 6c 65 20 6f | 66 20 73 63 72 65 65 6e |Handle o|f screen|
|000013d0| 20 77 69 74 68 20 6c 61 | 72 67 65 73 74 20 69 6e | with la|rgest in|
|000013e0| 74 65 72 73 65 63 74 69 | 6f 6e 20 77 69 74 68 20 |tersecti|on with |
|000013f0| 74 68 65 20 67 6c 6f 62 | 61 6c 20 72 65 63 74 2e |the glob|al rect.|
|00001400| 0d 7b 0d 09 52 65 63 74 | 20 6f 76 65 72 6c 61 70 |.{..Rect| overlap|
|00001410| 3b 0d 09 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |;..GDHan|dle devi|
|00001420| 63 65 2c 64 6f 6d 69 6e | 61 6e 74 44 65 76 69 63 |ce,domin|antDevic|
|00001430| 65 3d 4e 55 4c 4c 3b 0d | 09 6c 6f 6e 67 20 61 72 |e=NULL;.|.long ar|
|00001440| 65 61 2c 67 72 65 61 74 | 65 73 74 41 72 65 61 3b |ea,great|estArea;|
|00001450| 0d 09 6c 6f 6e 67 20 71 | 44 3b 0d 0d 09 69 66 28 |..long q|D;...if(|
|00001460| 72 3d 3d 4e 55 4c 4c 29 | 72 65 74 75 72 6e 20 4e |r==NULL)|return N|
|00001470| 55 4c 4c 3b 0d 09 47 65 | 73 74 61 6c 74 28 67 65 |ULL;..Ge|stalt(ge|
|00001480| 73 74 61 6c 74 51 75 69 | 63 6b 64 72 61 77 56 65 |staltQui|ckdrawVe|
|00001490| 72 73 69 6f 6e 2c 26 71 | 44 29 3b 0d 09 69 66 28 |rsion,&q|D);..if(|
|000014a0| 71 44 3c 67 65 73 74 61 | 6c 74 38 42 69 74 51 44 |qD<gesta|lt8BitQD|
|000014b0| 29 72 65 74 75 72 6e 20 | 4e 55 4c 4c 3b 09 2f 2f |)return |NULL;.//|
|000014c0| 20 6e 65 65 64 20 38 2d | 62 69 74 20 71 75 69 63 | need 8-|bit quic|
|000014d0| 6b 64 72 61 77 0d 09 64 | 65 76 69 63 65 3d 47 65 |kdraw..d|evice=Ge|
|000014e0| 74 44 65 76 69 63 65 4c | 69 73 74 28 29 3b 0d 09 |tDeviceL|ist();..|
|000014f0| 67 72 65 61 74 65 73 74 | 41 72 65 61 3d 30 3b 0d |greatest|Area=0;.|
|00001500| 09 77 68 69 6c 65 28 64 | 65 76 69 63 65 21 3d 4e |.while(d|evice!=N|
|00001510| 55 4c 4c 29 7b 0d 09 09 | 69 66 28 54 65 73 74 44 |ULL){...|if(TestD|
|00001520| 65 76 69 63 65 41 74 74 | 72 69 62 75 74 65 28 64 |eviceAtt|ribute(d|
|00001530| 65 76 69 63 65 2c 73 63 | 72 65 65 6e 44 65 76 69 |evice,sc|reenDevi|
|00001540| 63 65 29 0d 09 09 09 26 | 26 20 54 65 73 74 44 65 |ce)....&|& TestDe|
|00001550| 76 69 63 65 41 74 74 72 | 69 62 75 74 65 28 64 65 |viceAttr|ibute(de|
|00001560| 76 69 63 65 2c 73 63 72 | 65 65 6e 41 63 74 69 76 |vice,scr|eenActiv|
|00001570| 65 29 29 7b 0d 09 09 09 | 09 53 65 63 74 52 65 63 |e)){....|.SectRec|
|00001580| 74 28 72 2c 26 28 2a 64 | 65 76 69 63 65 29 2d 3e |t(r,&(*d|evice)->|
|00001590| 67 64 52 65 63 74 2c 26 | 6f 76 65 72 6c 61 70 29 |gdRect,&|overlap)|
|000015a0| 3b 0d 09 09 09 09 61 72 | 65 61 3d 28 6c 6f 6e 67 |;.....ar|ea=(long|
|000015b0| 29 28 6f 76 65 72 6c 61 | 70 2e 72 69 67 68 74 2d |)(overla|p.right-|
|000015c0| 6f 76 65 72 6c 61 70 2e | 6c 65 66 74 29 2a 28 6f |overlap.|left)*(o|
|000015d0| 76 65 72 6c 61 70 2e 62 | 6f 74 74 6f 6d 2d 6f 76 |verlap.b|ottom-ov|
|000015e0| 65 72 6c 61 70 2e 74 6f | 70 29 3b 0d 09 09 09 09 |erlap.to|p);.....|
|000015f0| 69 66 28 61 72 65 61 3e | 67 72 65 61 74 65 73 74 |if(area>|greatest|
|00001600| 41 72 65 61 29 7b 0d 09 | 09 09 09 09 67 72 65 61 |Area){..|....grea|
|00001610| 74 65 73 74 41 72 65 61 | 3d 61 72 65 61 3b 0d 09 |testArea|=area;..|
|00001620| 09 09 09 09 64 6f 6d 69 | 6e 61 6e 74 44 65 76 69 |....domi|nantDevi|
|00001630| 63 65 3d 64 65 76 69 63 | 65 3b 0d 09 09 09 09 7d |ce=devic|e;.....}|
|00001640| 0d 09 09 09 7d 0d 09 09 | 64 65 76 69 63 65 3d 47 |....}...|device=G|
|00001650| 65 74 4e 65 78 74 44 65 | 76 69 63 65 28 64 65 76 |etNextDe|vice(dev|
|00001660| 69 63 65 29 3b 0d 09 7d | 0d 09 72 65 74 75 72 6e |ice);..}|..return|
|00001670| 20 64 6f 6d 69 6e 61 6e | 74 44 65 76 69 63 65 3b | dominan|tDevice;|
|00001680| 0d 7d 0d 0d 76 6f 69 64 | 20 4c 6f 63 61 6c 54 6f |.}..void| LocalTo|
|00001690| 47 6c 6f 62 61 6c 52 65 | 63 74 28 52 65 63 74 20 |GlobalRe|ct(Rect |
|000016a0| 2a 72 29 0d 7b 0d 09 50 | 6f 69 6e 74 20 70 74 3d |*r).{..P|oint pt=|
|000016b0| 7b 30 2c 30 7d 3b 0d 09 | 0d 09 4c 6f 63 61 6c 54 |{0,0};..|..LocalT|
|000016c0| 6f 47 6c 6f 62 61 6c 28 | 26 70 74 29 3b 0d 09 4f |oGlobal(|&pt);..O|
|000016d0| 66 66 73 65 74 52 65 63 | 74 28 72 2c 70 74 2e 68 |ffsetRec|t(r,pt.h|
|000016e0| 2c 70 74 2e 76 29 3b 0d | 7d 0d 0d 76 6f 69 64 20 |,pt.v);.|}..void |
|000016f0| 47 6c 6f 62 61 6c 54 6f | 4c 6f 63 61 6c 52 65 63 |GlobalTo|LocalRec|
|00001700| 74 28 52 65 63 74 20 2a | 72 29 0d 7b 0d 09 50 6f |t(Rect *|r).{..Po|
|00001710| 69 6e 74 20 70 74 3d 7b | 30 2c 30 7d 3b 0d 09 0d |int pt={|0,0};...|
|00001720| 09 47 6c 6f 62 61 6c 54 | 6f 4c 6f 63 61 6c 28 26 |.GlobalT|oLocal(&|
|00001730| 70 74 29 3b 0d 09 4f 66 | 66 73 65 74 52 65 63 74 |pt);..Of|fsetRect|
|00001740| 28 72 2c 70 74 2e 68 2c | 70 74 2e 76 29 3b 0d 7d |(r,pt.h,|pt.v);.}|
|00001750| 0d 0d 23 69 66 20 55 4e | 49 56 45 52 53 41 4c 5f |..#if UN|IVERSAL_|
|00001760| 48 45 41 44 45 52 53 0d | 09 23 69 6e 63 6c 75 64 |HEADERS.|.#includ|
|00001770| 65 20 3c 44 69 73 70 6c | 61 79 73 2e 68 3e 0d 23 |e <Displ|ays.h>.#|
|00001780| 65 6c 73 65 0d 09 65 6e | 75 6d 7b 6b 44 4d 44 72 |else..en|um{kDMDr|
|00001790| 69 76 65 72 4e 6f 74 44 | 69 73 70 6c 61 79 4d 67 |iverNotD|isplayMg|
|000017a0| 72 41 77 61 72 65 45 72 | 72 20 3d 20 2d 36 32 32 |rAwareEr|r = -622|
|000017b0| 38 7d 3b 0d 09 65 78 74 | 65 72 6e 20 70 61 73 63 |8};..ext|ern pasc|
|000017c0| 61 6c 20 4f 53 45 72 72 | 20 44 4d 53 65 74 44 69 |al OSErr| DMSetDi|
|000017d0| 73 70 6c 61 79 4d 6f 64 | 65 28 47 44 48 61 6e 64 |splayMod|e(GDHand|
|000017e0| 6c 65 20 74 68 65 44 65 | 76 69 63 65 2c 75 6e 73 |le theDe|vice,uns|
|000017f0| 69 67 6e 65 64 20 6c 6f | 6e 67 20 6d 6f 64 65 0d |igned lo|ng mode.|
|00001800| 09 09 2c 75 6e 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |..,unsig|ned long|
|00001810| 20 2a 64 65 70 74 68 4d | 6f 64 65 2c 75 6e 73 69 | *depthM|ode,unsi|
|00001820| 67 6e 65 64 20 6c 6f 6e | 67 20 72 65 73 65 72 76 |gned lon|g reserv|
|00001830| 65 64 2c 48 61 6e 64 6c | 65 20 64 69 73 70 6c 61 |ed,Handl|e displa|
|00001840| 79 53 74 61 74 65 29 0d | 09 20 09 3d 7b 30 78 33 |yState).|. .={0x3|
|00001850| 30 33 43 2c 30 78 30 41 | 31 31 2c 30 78 41 42 45 |03C,0x0A|11,0xABE|
|00001860| 42 7d 3b 0d 09 65 78 74 | 65 72 6e 20 70 61 73 63 |B};..ext|ern pasc|
|00001870| 61 6c 20 4f 53 45 72 72 | 20 44 4d 43 68 65 63 6b |al OSErr| DMCheck|
|00001880| 44 69 73 70 6c 61 79 4d | 6f 64 65 28 47 44 48 61 |DisplayM|ode(GDHa|
|00001890| 6e 64 6c 65 20 74 68 65 | 44 65 76 69 63 65 2c 75 |ndle the|Device,u|
|000018a0| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 6d 6f 64 |nsigned |long mod|
|000018b0| 65 0d 09 09 2c 75 6e 73 | 69 67 6e 65 64 20 6c 6f |e...,uns|igned lo|
|000018c0| 6e 67 20 64 65 70 74 68 | 4d 6f 64 65 2c 75 6e 73 |ng depth|Mode,uns|
|000018d0| 69 67 6e 65 64 20 6c 6f | 6e 67 20 2a 73 77 69 74 |igned lo|ng *swit|
|000018e0| 63 68 46 6c 61 67 73 2c | 75 6e 73 69 67 6e 65 64 |chFlags,|unsigned|
|000018f0| 20 6c 6f 6e 67 20 72 65 | 73 65 72 76 65 64 0d 09 | long re|served..|
|00001900| 09 2c 42 6f 6f 6c 65 61 | 6e 20 2a 6d 6f 64 65 4f |.,Boolea|n *modeO|
|00001910| 6b 29 3d 7b 30 78 33 30 | 33 43 2c 30 78 30 43 31 |k)={0x30|3C,0x0C1|
|00001920| 32 2c 30 78 41 42 45 42 | 7d 3b 0d 09 65 6e 75 6d |2,0xABEB|};..enum|
|00001930| 20 7b 0d 09 09 67 65 73 | 74 61 6c 74 44 69 73 70 | {...ges|taltDisp|
|00001940| 6c 61 79 4d 67 72 41 74 | 74 72 09 09 3d 20 27 64 |layMgrAt|tr..= 'd|
|00001950| 70 6c 79 27 2c 09 2f 2a | 20 44 69 73 70 6c 61 79 |ply',./*| Display|
|00001960| 20 4d 61 6e 61 67 65 72 | 20 61 74 74 72 69 62 75 | Manager| attribu|
|00001970| 74 65 73 20 2a 2f 0d 09 | 09 67 65 73 74 61 6c 74 |tes */..|.gestalt|
|00001980| 44 69 73 70 6c 61 79 4d | 67 72 50 72 65 73 65 6e |DisplayM|grPresen|
|00001990| 74 09 3d 20 30 09 09 09 | 2f 2a 20 54 72 75 65 20 |t.= 0...|/* True |
|000019a0| 69 66 20 44 69 73 70 6c | 61 79 20 4d 67 72 20 69 |if Displ|ay Mgr i|
|000019b0| 73 20 70 72 65 73 65 6e | 74 20 2a 2f 0d 09 7d 3b |s presen|t */..};|
|000019c0| 0d 23 65 6e 64 69 66 0d | 0d 2f 2a 20 0d 54 68 65 |.#endif.|./* .The|
|000019d0| 73 65 20 65 6e 75 6d 20 | 64 65 66 69 6e 69 74 69 |se enum |definiti|
|000019e0| 6f 6e 73 20 66 6f 72 20 | 75 73 65 20 77 69 74 68 |ons for |use with|
|000019f0| 20 74 68 65 20 63 73 63 | 47 65 74 4e 65 78 74 52 | the csc|GetNextR|
|00001a00| 65 73 6f 6c 75 74 69 6f | 6e 20 64 72 69 76 65 72 |esolutio|n driver|
|00001a10| 20 73 74 61 74 75 73 20 | 63 61 6c 6c 20 0d 61 72 | status |call .ar|
|00001a20| 65 20 74 61 6b 65 6e 20 | 66 72 6f 6d 20 74 68 65 |e taken |from the|
|00001a30| 20 41 37 20 64 72 61 66 | 74 20 28 46 65 62 20 31 | A7 draf|t (Feb 1|
|00001a40| 30 2c 27 39 35 29 20 6f | 66 20 41 70 70 6c 65 27 |0,'95) o|f Apple'|
|00001a50| 73 20 44 65 73 69 67 6e | 69 6e 67 20 50 43 49 20 |s Design|ing PCI |
|00001a60| 43 61 72 64 73 20 61 6e | 64 20 44 72 69 76 65 72 |Cards an|d Driver|
|00001a70| 73 20 66 6f 72 0d 50 6f | 77 65 72 20 4d 61 63 20 |s for.Po|wer Mac |
|00001a80| 43 6f 6d 70 75 74 65 72 | 73 2e 20 55 6e 64 6f 75 |Computer|s. Undou|
|00001a90| 62 74 65 64 6c 79 20 74 | 68 65 73 65 20 65 6e 75 |btedly t|hese enu|
|00001aa0| 6d 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 77 69 |m defini|tions wi|
|00001ab0| 6c 6c 20 61 70 70 65 61 | 72 20 69 6e 20 73 6f 6d |ll appea|r in som|
|00001ac0| 65 20 66 75 74 75 72 65 | 20 0d 76 65 72 73 69 6f |e future| .versio|
|00001ad0| 6e 20 6f 66 20 56 69 64 | 65 6f 2e 68 2c 20 70 65 |n of Vid|eo.h, pe|
|00001ae0| 72 68 61 70 73 20 77 69 | 74 68 20 43 6f 64 65 57 |rhaps wi|th CodeW|
|00001af0| 61 72 72 69 6f 72 20 36 | 2c 20 61 74 20 77 68 69 |arrior 6|, at whi|
|00001b00| 63 68 20 74 69 6d 65 20 | 74 68 65 79 20 63 61 6e |ch time |they can|
|00001b10| 20 62 65 20 64 65 6c 65 | 74 65 64 20 66 72 6f 6d | be dele|ted from|
|00001b20| 20 68 65 72 65 2e 0d 2a | 2f 0d 65 6e 75 6d 7b 0d | here..*|/.enum{.|
|00001b30| 09 6b 44 69 73 70 6c 61 | 79 4d 6f 64 65 49 44 43 |.kDispla|yModeIDC|
|00001b40| 75 72 72 65 6e 74 3d 30 | 0d 09 2c 6b 44 69 73 70 |urrent=0|..,kDisp|
|00001b50| 6c 61 79 4d 6f 64 65 49 | 44 49 6e 76 61 6c 69 64 |layModeI|DInvalid|
|00001b60| 3d 30 78 66 66 66 66 66 | 66 66 66 0d 09 2c 6b 44 |=0xfffff|fff..,kD|
|00001b70| 69 73 70 6c 61 79 4d 6f | 64 65 49 44 46 69 6e 64 |isplayMo|deIDFind|
|00001b80| 46 69 72 73 74 52 65 73 | 6f 6c 75 74 69 6f 6e 3d |FirstRes|olution=|
|00001b90| 30 78 66 66 66 66 66 66 | 66 65 0d 09 2c 6b 44 69 |0xffffff|fe..,kDi|
|00001ba0| 73 70 6c 61 79 4d 6f 64 | 65 49 44 4e 6f 4d 6f 72 |splayMod|eIDNoMor|
|00001bb0| 65 52 65 73 6f 6c 75 74 | 69 6f 6e 73 3d 30 78 66 |eResolut|ions=0xf|
|00001bc0| 66 66 66 66 66 66 64 0d | 7d 3b 0d 00 00 00 00 00 |ffffffd.|};......|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 00 00 01 00 00 00 02 30 | 00 00 01 30 00 00 00 5e |.......0|...0...^|
|00001c10| 63 65 2e 63 20 76 65 72 | 73 69 6f 6e 20 32 2e 30 |ce.c ver|sion 2.0|
|00001c20| 33 0d 52 65 74 75 72 6e | 73 20 61 20 68 61 6e 64 |3.Return|s a hand|
|00001c30| 11 47 65 74 53 63 72 65 | 65 6e 44 65 76 69 63 65 |.GetScre|enDevice|
|00001c40| 2e 63 02 00 00 00 50 61 | 72 74 53 49 54 21 00 00 |.c....Pa|rtSIT!..|
|00001c50| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00001c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c70| 00 00 ab bf ee 5f 00 00 | 00 00 00 00 02 8e 6f 74 |....._..|......ot|
|00001c80| 28 29 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 64 |() retur|ns the d|
|00001c90| 65 76 69 63 65 27 73 20 | 73 6c 6f 74 20 6e 75 6d |evice's |slot num|
|00001ca0| 62 65 72 2e 0d 4e 6f 74 | 65 3a 20 74 68 69 73 20 |ber..Not|e: this |
|00001cb0| 66 69 6c 65 20 77 61 73 | 20 66 6f 72 6d 65 72 6c |file was| formerl|
|00001cc0| 79 20 63 61 6c 6c 65 64 | 20 47 44 47 65 74 53 63 |y called| GDGetSc|
|00001cd0| 72 65 65 6e 44 65 76 69 | 63 65 2e 63 2c 20 61 6c |reenDevi|ce.c, al|
|00001ce0| 74 68 6f 75 67 68 74 20 | 74 68 65 20 66 75 6e 63 |thought |the func|
|00001cf0| 74 69 6f 6e 0d 69 74 73 | 65 6c 66 20 68 61 73 20 |tion.its|elf has |
|00001d00| 00 00 00 1e 00 2a 00 03 | 01 dd 02 7d 00 29 01 42 |.....*..|...}.).B|
|00001d10| 01 6a 02 79 00 00 05 ce | 00 00 00 00 00 00 00 00 |.j.y....|........|
|00001d20| 00 00 00 00 00 b6 00 07 | 00 00 18 3c 00 00 18 3c |........|...<...<|
|00001d30| 15 41 64 64 72 65 73 73 | 54 6f 53 63 72 65 65 6e |.Address|ToScreen|
|00001d40| 44 65 76 69 63 65 00 00 | 18 3c 00 00 18 3c 0d 41 |Device..|.<...<.A|
|00001d50| 64 64 72 65 73 73 54 6f | 53 6c 6f 74 00 00 12 48 |ddressTo|Slot...H|
|00001d60| 00 00 12 48 0f 47 65 74 | 53 63 72 65 65 6e 44 65 |...H.Get|ScreenDe|
|00001d70| 76 69 63 65 00 00 12 9f | 00 00 12 ae 0f 47 65 74 |vice....|.....Get|
|00001d80| 57 69 6e 64 6f 77 44 65 | 76 69 63 65 00 00 18 e3 |WindowDe|vice....|
|00001d90| 00 00 18 f4 11 47 6c 6f | 62 61 6c 54 6f 4c 6f 63 |.....Glo|balToLoc|
|00001da0| 61 6c 52 65 63 74 00 00 | 18 7c 00 00 18 8d 11 4c |alRect..|.|.....L|
|00001db0| 6f 63 61 6c 54 6f 47 6c | 6f 62 61 6c 52 65 63 74 |ocalToGl|obalRect|
|00001dc0| 00 00 18 3c 00 00 18 3c | 13 53 6c 6f 74 54 6f 53 |...<...<|.SlotToS|
|00001dd0| 63 72 65 65 6e 44 65 76 | 69 63 65 00 00 00 00 48 |creenDev|ice....H|
|00001de0| 00 09 4d 6f 6e 61 63 6f | 00 00 00 00 00 00 00 00 |..Monaco|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e00| 00 00 00 03 00 04 00 5d | 00 05 01 9c 02 64 00 5d |.......]|.....d.]|
|00001e10| 00 05 01 9c 02 64 ab b6 | 0a d2 00 00 16 f3 00 00 |.....d..|........|
|00001e20| 16 fd 00 00 16 4e 00 00 | 00 00 00 04 00 01 00 01 |.....N..|........|
|00001e30| 00 00 01 00 00 00 02 30 | 00 00 01 30 00 00 00 5e |.......0|...0...^|
|00001e40| 00 8a 18 a0 1e 1e 00 00 | 00 1c 00 5e 00 01 4d 50 |........|...^..MP|
|00001e50| 53 52 00 02 00 12 4d 57 | 42 42 00 00 00 36 03 f0 |SR....MW|BB...6..|
|00001e60| ff ff 00 00 00 00 00 00 | 00 00 03 ef ff ff 00 00 |........|........|
|00001e70| 00 22 00 00 00 00 03 ed | ff ff 00 00 00 dc 00 00 |."......|........|
|00001e80| 00 00 03 f0 ff ff 00 00 | 01 28 00 00 00 00 00 00 |........|.(......|
|00001e90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+